package com.imooc.bilibili.entity;

import lombok.*;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.util.Date;
import java.io.Serializable;

/**
 * 用户信息表(UserInfo)实体类  user_info
 *
 * @author makejava
 * @since 2023-03-27 15:47:47
 */
@AllArgsConstructor
@NoArgsConstructor
@Data
@ToString
@EqualsAndHashCode
@Document(indexName = "users")
public class UserInfo implements Serializable {
    private static final long serialVersionUID = 288097238488068938L;
    /**
     * 用户信息表主键
     */
    @Id
    private Long userId;
    /**
     * 用户登录信息表主键
     */
    private Long loginId;
    /**
     * 昵称
     */
    @Field(type = FieldType.Text)
    private String userNick;
    /**
     * 头像
     */
    private String userAvatar;
    /**
     * 签名
     */
    private String userSign;
    /**
     * 性别,默认0为男生,1为女生,2为未知
     */
    private Integer userGender;
    /**
     * 生日
     */
    private String userBirth;
    /**
     * 启用状态,默认0为启用,1为未启用
     */
    private Integer enableState;
    /**
     * 删除状态，默认0为未删除,1为已删除
     */
    private Integer deleteState;
    /**
     * 创建时间
     */
    @Field(type = FieldType.Date)
    private Date createTime;
    /**
     * 更新时间
     */
    @Field(type = FieldType.Date)
    private Date updateTime;

    private Boolean followed;
}

